diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2023-02-18 15:25:29 +0100 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2023-02-18 15:25:29 +0100 |
| commit | 69d345b334c7a3fecdb0cd5f440fabd83a755309 (patch) | |
| tree | 09de5c21f7989a98397e6e700f8d4e9347e8bd90 /src/routes/[lang=lang]/+page.server.ts | |
| parent | c709aa638c7d3458dd73c3aabadb4924cb1cb80e (diff) | |
| download | auroraklinikken.no-69d345b334c7a3fecdb0cd5f440fabd83a755309.tar.xz auroraklinikken.no-69d345b334c7a3fecdb0cd5f440fabd83a755309.zip | |
.
Diffstat (limited to 'src/routes/[lang=lang]/+page.server.ts')
| -rw-r--r-- | src/routes/[lang=lang]/+page.server.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/routes/[lang=lang]/+page.server.ts b/src/routes/[lang=lang]/+page.server.ts index 6e0a910..a647cfe 100644 --- a/src/routes/[lang=lang]/+page.server.ts +++ b/src/routes/[lang=lang]/+page.server.ts @@ -1,8 +1,10 @@ import { sanity } from '$lib/sanity-client'; import type { PageServerLoad } from './$types'; import groq from "groq"; -import type { ContactModel } from '$components/contact.svelte'; +import type { ContactModel } from './sections/contact.svelte'; import { fromLocalizedString } from '$lib/utils'; +import type { HeroModel } from './sections/hero.svelte'; +import type { DescriptionModel } from './sections/description.svelte'; export const load = (async ({ locals }) => { const contactSection = await sanity.fetch(groq`*[_type == "contact"][0]`); @@ -14,6 +16,14 @@ export const load = (async ({ locals }) => { email: fromLocalizedString(contactSection.email, locals.locale), phoneHours: fromLocalizedString(contactSection.phoneHours, locals.locale), addressLines: contactSection.addressLines.map((el: string | object) => fromLocalizedString(el, locals.locale)), - } as ContactModel + } as ContactModel, + hero: { + title: heroSection.title, + content: heroSection.content + } as HeroModel, + description: { + title: descriptionSection.title, + content: descriptionSection.content + } as DescriptionModel }; }) satisfies PageServerLoad;
\ No newline at end of file |
